﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace docent
{
    public class Documents
    {
        static Document[] docs = new Document[] {
                new Document(1,"平凡的世界", 
                    new Document(11,"序言"),
                    new Document(12,"第一章"),
                    new Document(13,"第二章"),
                    new Document(14,"结束语")),

                new Document(1,"我的大学", 
                    new Document(11,"序言"),
                    new Document(12,"第一章"),
                    new Document(13,"第二章"),
                    new Document(14,"结束语"))
            };
        public Document[] QueryByState(long ownerID, FlowState state)
        {
            return docs.Where(p => (p.FlowState & state) == p.FlowState).ToArray();
        }
    }
}
